Silver Platform
TPT supports the test execution on Silver, a simulation tool of the company QTronic.
To use TPT with Silver you have to have:
- TPT installed. By default, the installation directory is
C:\Program Files\TPT-{Version Number}\
, referred to as<tpt-install-dir>
. - Silver installed. Analogously, the installation directory for Silver will be referred to as
<silver-install-dir>
.
Silver Project Setup
To test Silver Projects with TPT, you have to add a test driver module (the TPT VM) to the Silver Project. A new module has to be included, which can be found at<tpt-install-dir>\tptplugins\silver\tpt32_vm.dll
.
The module requires two parameters:
- The path to the compiled test case in the TPTVM format (it can be found in the corresponding test data directory as
testcase.tvm
). - The path to the TPTBIN result file where all recorded data shall be stored for the subsequent automatic assessment (also in the corresponding test data directory as
testcase.tptbin
).
For simple configuration and automatic test execution, it is recommended to use Silver environmental variables, for example TPTVM, SCENFILE, RECFILE:
These variables can be handled by TPT to correctly configure the Silver project for each test execution.
Silver Platform Setup
To use TPT with Silver, you have to create and configure a Silver Platform in TPT. First, add a new Silver Platform.
Then, configure the platform.
Step Size
The desired Macro Step width (corresponding to the silver project).
Timeout
The simulation timeout.
History Size
The number of steps the TPT VM should be able to look back in time during stimulation.
Mapping
A mapping, for example imported from an A2L file, that contains a Rename mapping flavor. Then TPT will use the external names provided by this mapping flavor in Silver. If no mapping is given, TPT assumes that Silver and TPT variable names are equal.
Working Directory
The working directory for silver. All relative paths in Silver are relative to this directory.
Silver Startup Command
To call the Silver simulation tool. This command is executed for each test case. Use the following arguments:
Once the Silver platform is configured, an interface needs to be defined either using the Declaration Editor or by importing the interface from an A2L file (Tools | Import | A2L).
Once the Silver Platform and the interface are ready, you can execute test cases in TPT. For each test case, a Silver instance is started.
Place the TPT node in a way that all its input and output dependencies are fulfilled. That is, all nodes that provide input to TPT have to be executed before the TPT node. Only those nodes that modify TPT outputs in the same cycle should be placed behind. In most cases, it is suitable to place the TPT node at the end.
Enter the additional command -l test.log
to make Silver create a log for each test file.
Silver Platform Additional Notes
- The Silver GUI always wins. It is recommended to disable it for testing with TPT.
- TPT waits for the Silver simulation to finish. Therefore, choose an adequate platform time out.